﻿<%@ Page Language="C#"   AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="CanDoo.Oil.WebApp.storeOutStoreOther.Edit" %>

<%@ Register Src="../UserControls/SelectUser.ascx" TagPrefix="uc1" TagName="SelectUser" %>
<%@ Register Src="../UserControls/SelectWarehouse.ascx" TagPrefix="uc1" TagName="SelectWarehouse" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>其他出库单编辑</title>
    <link href="/res/css/common.css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="PanelMain" runat="server" />

        <f:Panel ID="PanelMain" ShowBorder="false" ShowHeader="false"  AutoScroll="true" runat="server" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start" >
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                        <f:Button ID="btnClose" EnablePostBack="false" runat="server" Hidden="true"
                            Text="关闭">
                        </f:Button>
                        <f:Button ID="btnSave" ValidateForms="FormEdit" Hidden="true"
                            OnClick="btnSave_Click" runat="server" Text="保存">
                        </f:Button>
                        <f:Button ID="btnToEdit" Hidden="true"
                            OnClick="btnToEdit_Click" runat="server" Text="编辑信息">
                        </f:Button>
                        <f:HiddenField ID="ed_EntityId" runat="server"></f:HiddenField>
                    </Items>
                </f:Toolbar>
            </Toolbars>
            <Items>
                <f:Form BodyPadding="10px" ShowBorder="false" EnableCollapse="true"
                    ID="FormEdit" runat="server" ShowHeader="false" LabelAlign="Right">
                    <Items>
                        <f:Panel ID="Panel0" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:TextBox ID="ed_Name" runat="server" Required="true" ShowRedStar="True" Label="名称">
                                </f:TextBox>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel1" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:TextBox ID="ed_Code" runat="server" Required="true" ShowRedStar="True" Label="出库单号" MaxLength="50">
                                </f:TextBox>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:DatePicker ID="ed_OutStoreDate" runat="server" Required="true" ShowRedStar="True" Label="出库日期">
                                </f:DatePicker>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel3" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:DropDownBox runat="server" ID="ed_User" EmptyText="请选择出货人" DataControlID="SelectUserControl_GridList" EnableMultiSelect="false" MatchFieldWidth="false" ShowLabel="true" AutoShowClearIcon="true"  Required="true" ShowRedStar="True" Label="出货人">
                                    <PopPanel>
                                        <f:UserControlConnector runat="server">
                                            <uc1:SelectUser runat="server" id="SelectUser" />
                                        </f:UserControlConnector>
                                    </PopPanel>
                                </f:DropDownBox>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel4" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:DropDownBox runat="server" ID="ed_GetUser" EmptyText="请选择收货人" DataControlID="SelectUserControl_GridList" EnableMultiSelect="false" MatchFieldWidth="false" ShowLabel="true" AutoShowClearIcon="true"  Required="true" ShowRedStar="True" Label="收货人">
                                    <PopPanel>
                                        <f:UserControlConnector runat="server">
                                            <uc1:SelectUser runat="server" id="SelectGetUser" />
                                        </f:UserControlConnector>
                                    </PopPanel>
                                </f:DropDownBox>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel5" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:NumberBox ID="ed_Warehouse" runat="server" Required="true" ShowRedStar="True" Label="发货仓库">
                                </f:NumberBox>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel6" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:DropDownBox runat="server" ID="ed_Num" EmptyText="请选择出库数量" DataControlID="SelectWarehouseControl_GridList" EnableMultiSelect="false" MatchFieldWidth="false" ShowLabel="true" AutoShowClearIcon="true"  Required="true" ShowRedStar="True" Label="出库数量">
                                    <PopPanel>
                                        <f:UserControlConnector runat="server">
                                            <uc1:SelectWarehouse runat="server" id="SelectNum" />
                                        </f:UserControlConnector>
                                    </PopPanel>
                                </f:DropDownBox>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel7" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:NumberBox ID="ed_Money" runat="server" Required="true" ShowRedStar="True" Label="出库金额">
                                </f:NumberBox>
                            </Items>
                        </f:Panel>
                        <f:Panel ID="Panel8" ShowHeader="false" ShowBorder="false" runat="server" Layout="Column" BoxConfigAlign="Stretch">
                            <Items>
                                <f:TextArea ID="ed_Remark" runat="server" Label="备注"  Height="150px" MaxLength="500">
                                </f:TextArea>
                            </Items>
                        </f:Panel>
                    </Items>
                </f:Form>
                 <f:Grid ID="GridChild" ShowBorder="true" ShowHeader="true" Title="其他出库单明细" EnableCollapse="true" MinHeight="400px" BodyPadding="5px"
                    runat="server" DataKeyNames="Id" AllowCellEditing="true" OnPreDataBound="GridChild_PreDataBound" EnableColumnLines="true" ShowSelectedCell="true" ClicksToEdit="1" BoxFlex="1" TabEditableCell="true">
                    <Toolbars>
                        <f:Toolbar ID="Toolbar2" runat="server">
                            <Items>
                                <f:Button ID="btnNew" Text="新增行" Icon="Add" EnablePostBack="false" runat="server">
                                </f:Button>
                                <f:Button ID="btnDelete" Text="删除行" Icon="Delete" EnablePostBack="false" runat="server">
                                </f:Button>
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:TemplateField Width="40px">
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                            </ItemTemplate>
                        </f:TemplateField>
                        <f:RenderField Width="150px" ColumnID="Price" DataField="Price" FieldType="double"
                            HeaderText="单价">
                            <Editor>
                                <f:NumberBox ID="ed_child_Price" runat="server"  Required="true" >
                                </f:NumberBox>
                            </Editor> 
                        </f:RenderField> 
                        <f:RenderField Width="150px" ColumnID="Num" DataField="Num" FieldType="double"
                            HeaderText="数量">
                            <Editor>
                                <f:NumberBox ID="ed_child_Num" runat="server"  Required="true" >
                                </f:NumberBox>
                            </Editor> 
                        </f:RenderField> 
                        <f:RenderField Width="150px" ColumnID="Money" DataField="Money" FieldType="double"
                            HeaderText="金额">
                            <Editor>
                                <f:NumberBox ID="ed_child_Money" runat="server"  Required="true" >
                                </f:NumberBox>
                            </Editor> 
                        </f:RenderField> 
                        <f:RenderField Width="150px" ColumnID="AlreadyNum" DataField="AlreadyNum" FieldType="double"
                            HeaderText="收货数量">
                            <Editor>
                                <f:NumberBox ID="ed_child_AlreadyNum" runat="server"  Required="true" >
                                </f:NumberBox>
                            </Editor> 
                        </f:RenderField> 
                        <f:RenderField Width="150px" ColumnID="AlreadyMoney" DataField="AlreadyMoney" FieldType="double"
                            HeaderText="收货金额">
                            <Editor>
                                <f:NumberBox ID="ed_child_AlreadyMoney" runat="server"  Required="true" >
                                </f:NumberBox>
                            </Editor> 
                        </f:RenderField> 
                        <f:RenderField Width="150px" ColumnID="Coefficient" DataField="Coefficient" FieldType="int"
                            HeaderText="出入库方向">
                            <Editor>
                                <f:NumberBox ID="ed_child_Coefficient" runat="server"  Required="true" >
                                </f:NumberBox>
                            </Editor> 
                        </f:RenderField> 
                        <f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" FieldType="String"
                            HeaderText="备注">
                            <Editor>
                                <f:TextBox ID="ed_child_Remark" runat="server" >
                                </f:TextBox>
                            </Editor> 
                        </f:RenderField> 
                        <f:LinkButtonField ColumnID="Delete" HeaderText="删除" Width="80px" EnablePostBack="false" Text="删除"/>
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>
    </form>
</body>
</html>
